]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Fix linting errors from line shifts
authorEvan Welsh <contact@evanwelsh.com>
Thu, 8 Jun 2023 04:53:07 +0000 (21:53 -0700)
committerEvan Welsh <contact@evanwelsh.com>
Wed, 21 Jun 2023 11:50:33 +0000 (04:50 -0700)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2794>

20 files changed:
js/gdm/authPrompt.js
js/gdm/util.js
js/misc/modemManager.js
js/misc/systemActions.js
js/ui/accessDialog.js
js/ui/appDisplay.js
js/ui/layout.js
js/ui/mpris.js
js/ui/overviewControls.js
js/ui/padOsd.js
js/ui/popupMenu.js
js/ui/screenShield.js
js/ui/screenshot.js
js/ui/search.js
js/ui/searchController.js
js/ui/shellMountOperation.js
js/ui/status/accessibility.js
js/ui/status/keyboard.js
js/ui/windowManager.js
js/ui/windowMenu.js

index 7dccb448f3eb5db8363c5f911369532e3de8dbe3..78bf29dd971ef54961dcd2eb15232d6376934aa1 100644 (file)
@@ -188,10 +188,10 @@ var AuthPrompt = GObject.registerClass({
         this._entry = null;
 
         this._textEntry = new St.Entry(entryParams);
-        ShellEntry.addContextMenu(this._textEntry, { actionMode: Shell.ActionMode.NONE });
+        ShellEntry.addContextMenu(this._textEntry, {actionMode: Shell.ActionMode.NONE});
 
         this._passwordEntry = new St.PasswordEntry(entryParams);
-        ShellEntry.addContextMenu(this._passwordEntry, { actionMode: Shell.ActionMode.NONE });
+        ShellEntry.addContextMenu(this._passwordEntry, {actionMode: Shell.ActionMode.NONE});
 
         this._entry = this._passwordEntry;
         this._mainBox.add_child(this._entry);
index 1d62517c313f8f2a5bedd41a1cf7702a52530d84..18a6c09c0ee2ce294a811248f43e6aae7d86f696 100644 (file)
@@ -534,7 +534,7 @@ var ShellUserVerifier = class extends Signals.EventEmitter {
     }
 
     serviceIsForeground(serviceName) {
-        return serviceName == this._getForegroundService();
+        return serviceName === this._getForegroundService();
     }
 
     foregroundServiceDeterminesUsername() {
index d6b906cf2637338523b3365402fd7f974ab6c575..c95bd3c5198079742cd5577dc10d493ba9cfd576 100644 (file)
@@ -8,12 +8,16 @@ const NMA4 = imports.gi.NMA4;
 
 const { loadInterfaceXML } = imports.misc.fileUtils;
 
-// _getMobileProvidersDatabase:
-//
-// Gets the database of mobile providers, with references between MCCMNC/SID and
-// operator name
-//
 let _mpd;
+
+/**
+ * _getMobileProvidersDatabase:
+ *
+ * Gets the database of mobile providers, with references between MCCMNC/SID and
+ * operator name
+ *
+ * @returns {NMA4.MobileProvidersDatabase | null}
+ */
 function _getMobileProvidersDatabase() {
     if (_mpd == null) {
         try {
index ddc9560db49b5f30c50ad4b094cbda0e8fc6135c..36da63cd9faeb5a381d8b41d0c3b65abaa85a4aa 100644 (file)
@@ -148,9 +148,9 @@ const SystemActions = GObject.registerClass({
             available: true,
         });
 
-        this._loginScreenSettings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
-        this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
-        this._orientationSettings = new Gio.Settings({ schema_id: 'org.gnome.settings-daemon.peripherals.touchscreen' });
+        this._loginScreenSettings = new Gio.Settings({schema_id: LOGIN_SCREEN_SCHEMA});
+        this._lockdownSettings = new Gio.Settings({schema_id: LOCKDOWN_SCHEMA});
+        this._orientationSettings = new Gio.Settings({schema_id: 'org.gnome.settings-daemon.peripherals.touchscreen'});
 
         this._session = new GnomeSession.SessionManager();
         this._loginManager = LoginManager.getLoginManager();
index 23a385057ff05ac8fe682c45c9a0a495ce0cae85..ee3bd7cbda243e352ace9fa6b46028fdcc62e47f 100644 (file)
@@ -58,7 +58,7 @@ class AccessDialog extends ModalDialog.ModalDialog {
 
             let check = new CheckBox.CheckBox();
             check.getLabelActor().text = name;
-            check.checked = selected == "true";
+            check.checked = selected === 'true';
             content.add_child(check);
 
             this._choices.set(id, check);
index 372fcd56348f6634301919d42ac9dd3b2735b8ae..3f9334eaebfcd56679ffc3c4157bb76b21232792 100644 (file)
@@ -2153,7 +2153,7 @@ class FolderView extends BaseAppView {
         if (appIndex === -1)
             return [-1, -1];
 
-        const { itemsPerPage } = this._grid;
+        const {itemsPerPage} = this._grid;
         return [Math.floor(appIndex / itemsPerPage), appIndex % itemsPerPage];
     }
 
index 3d0f2c5fff7dd84e3d12ba5032e89169771e2704..cbd28c38a0c08d5afa4fc0d3a300d51f17ed0e86 100644 (file)
@@ -335,9 +335,9 @@ var LayoutManager = GObject.registerClass({
 
         let display = global.display;
         display.connect('restacked',
-                        this._windowsRestacked.bind(this));
+            this._windowsRestacked.bind(this));
         display.connect('in-fullscreen-changed',
-                        this._updateFullscreen.bind(this));
+            this._updateFullscreen.bind(this));
 
         const monitorManager = global.backend.get_monitor_manager();
         monitorManager.connectObject(
index 6ccf88de929ac78f4d080c70ec6b8ec686a5c233..5d1a4f2756dd7bdf3b1a327e5a284c88c5f45763 100644 (file)
@@ -71,7 +71,7 @@ class MediaMessage extends MessageList.Message {
 
         if (this._player.trackCoverUrl) {
             let file = Gio.File.new_for_uri(this._player.trackCoverUrl);
-            this._icon.gicon = new Gio.FileIcon({ file });
+            this._icon.gicon = new Gio.FileIcon({file});
             this._icon.remove_style_class_name('fallback');
         } else if (this._player.app) {
             this._icon.gicon = this._player.app.icon;
index 59d70e40643ddc92ab239e7cd666ea9860cb7804..c24416da13ffece4a1083a984788e9df807996d3 100644 (file)
@@ -506,7 +506,7 @@ class ControlsManager extends St.Widget {
             () => this._shiftState(Meta.MotionDirection.UP));
 
         Main.wm.addKeybinding('shift-overview-down',
-            new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA }),
+            new Gio.Settings({schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA}),
             Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
             Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
             () => this._shiftState(Meta.MotionDirection.DOWN));
index 364cc16e927c6b3e537d3d64ebca7e5d5978be4a..fa6d3d0979ea9121c603618bf6dc4075ff9cbcef 100644 (file)
@@ -104,7 +104,7 @@ var KeybindingEntry = GObject.registerClass({
     Signals: { 'keybinding-edited': { param_types: [GObject.TYPE_STRING] } },
 }, class KeybindingEntry extends St.Entry {
     _init() {
-        super._init({ hint_text: _("New shortcut…"), style: 'width: 10em' });
+        super._init({hint_text: _('New shortcut…'), style: 'width: 10em'});
     }
 
     vfunc_captured_event(event) {
index 32c384b8c91593354394dde0d6a42c56f566fe44..547ce08f4f19f58286a34c23b2d57a93d3ef06fa 100644 (file)
@@ -239,7 +239,7 @@ var PopupBaseMenuItem = GObject.registerClass({
     }
 
     setOrnament(ornament) {
-        if (ornament == this._ornament)
+        if (ornament === this._ornament)
             return;
 
         this._ornament = ornament;
index d4eba58fdb912909c2205f8b3420eeaece8cb24a..8a10d7fe34e29f2c3c5c53d0cf1911c6f3f6ab79 100644 (file)
@@ -94,10 +94,10 @@ var ScreenShield = class extends Signals.EventEmitter {
 
         this._smartcardManager = SmartcardManager.getSmartcardManager();
         this._smartcardManager.connect('smartcard-inserted',
-                                       (manager, token) => {
-                                           if (this._isLocked && token.UsedToLogin)
-                                               this._activateDialog();
-                                       });
+            (manager, token) => {
+                if (this._isLocked && token.UsedToLogin)
+                    this._activateDialog();
+            });
 
         this._credentialManagers = {};
         this.addCredentialManager(OVirt.SERVICE_NAME, OVirt.getOVirtCredentialsManager());
index 9c57f0015d064cdd51d453543f01bfe6e9587b4d..86b62c149479ddf83e6c277cdf16c31e944c6253 100644 (file)
@@ -1272,7 +1272,7 @@ var ScreenshotUI = GObject.registerClass({
         this._shotButton.bind_property('checked', this._castButton, 'checked',
             GObject.BindingFlags.BIDIRECTIONAL | GObject.BindingFlags.INVERT_BOOLEAN);
 
-        this._captureButton = new St.Button({ style_class: 'screenshot-ui-capture-button' });
+        this._captureButton = new St.Button({style_class: 'screenshot-ui-capture-button'});
         this._captureButton.set_child(new St.Widget({
             style_class: 'screenshot-ui-capture-button-circle',
         }));
index fc71f2143ce0ba4464f8d499f25173753862b2b6..348f397999ec498def5a3f2a92d2066115a00abd 100644 (file)
@@ -540,7 +540,7 @@ class GridSearchResults extends SearchResultsBase {
 });
 
 var SearchResultsView = GObject.registerClass({
-    Signals: { 'terms-changed': {} },
+    Signals: {'terms-changed': {}},
 }, class SearchResultsView extends St.BoxLayout {
     _init() {
         super._init({
index 3a290fc171e9a86c5082641d28bd4a3fefa31a75..d34fe54f235bc51d39a9aabd1c269b6821ba61f3 100644 (file)
@@ -324,9 +324,10 @@ var SearchController = GObject.registerClass({
 
     /**
      * addProvider:
-     * @param {object} provider - a search provider implementation
      *
      * Add a search provider to the controller.
+     *
+     * @param {object} provider - a search provider implementation
      */
     addProvider(provider) {
         this._searchResults._registerProvider(provider);
@@ -334,9 +335,10 @@ var SearchController = GObject.registerClass({
 
     /**
      * removeProvider:
-     * @param {object} provider - a search provider implementation
      *
      * Remove a search provider from the controller.
+     *
+     * @param {object} provider - a search provider implementation
      */
     removeProvider(provider) {
         this._searchResults._unregisterProvider(provider);
index 30db22fede5d18f2f827d024f3e70d87489e60df..86ec781fceda16f688e96aeedffe8d3231446f05 100644 (file)
@@ -289,17 +289,17 @@ var ShellMountPasswordDialog = GObject.registerClass({
         let curGridRow = 0;
 
         if (flags & Gio.AskPasswordFlags.TCRYPT) {
-            this._hiddenVolume = new CheckBox.CheckBox(_("Hidden Volume"));
+            this._hiddenVolume = new CheckBox.CheckBox(_('Hidden Volume'));
             content.add_child(this._hiddenVolume);
 
-            this._systemVolume = new CheckBox.CheckBox(_("Windows System Volume"));
+            this._systemVolume = new CheckBox.CheckBox(_('Windows System Volume'));
             content.add_child(this._systemVolume);
 
-            this._keyfilesCheckbox = new CheckBox.CheckBox(_("Uses Keyfiles"));
-            this._keyfilesCheckbox.connect("clicked", this._onKeyfilesCheckboxClicked.bind(this));
+            this._keyfilesCheckbox = new CheckBox.CheckBox(_('Uses Keyfiles'));
+            this._keyfilesCheckbox.connect('clicked', this._onKeyfilesCheckboxClicked.bind(this));
             content.add_child(this._keyfilesCheckbox);
 
-            this._keyfilesLabel = new St.Label({ visible: false });
+            this._keyfilesLabel = new St.Label({visible: false});
             if (disksApp) {
                 this._keyfilesLabel.clutter_text.set_markup(
                     /* Translators: %s is the Disks application */
@@ -374,7 +374,7 @@ var ShellMountPasswordDialog = GObject.registerClass({
         content.add_child(passwordGrid);
 
         if (flags & Gio.AskPasswordFlags.SAVING_SUPPORTED) {
-            this._rememberChoice = new CheckBox.CheckBox(_("Remember Password"));
+            this._rememberChoice = new CheckBox.CheckBox(_('Remember Password'));
             this._rememberChoice.checked =
                 global.settings.get_boolean(REMEMBER_MOUNT_PASSWORD_KEY);
             content.add_child(this._rememberChoice);
@@ -385,17 +385,17 @@ var ShellMountPasswordDialog = GObject.registerClass({
         this.contentLayout.add_child(content);
 
         this._defaultButtons = [{
-            label: _("Cancel"),
+            label: _('Cancel'),
             action: this._onCancelButton.bind(this),
             key: Clutter.KEY_Escape,
         }, {
-            label: _("Unlock"),
+            label: _('Unlock'),
             action: this._onUnlockButton.bind(this),
             default: true,
         }];
 
         this._usesKeyfilesButtons = [{
-            label: _("Cancel"),
+            label: _('Cancel'),
             action: this._onCancelButton.bind(this),
             key: Clutter.KEY_Escape,
         }];
index a65b2bb6e46ee2ac2f1d2313c96018a13a6d02f6..e088512c55939978af86387df4da072644e59d0c 100644 (file)
@@ -74,7 +74,7 @@ class ATIndicator extends PanelMenu.Button {
         let bounceKeys = this._buildItem(_("Bounce Keys"), A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED);
         this.menu.addMenuItem(bounceKeys);
 
-        let mouseKeys = this._buildItem(_("Mouse Keys"), A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED);
+        let mouseKeys = this._buildItem(_('Mouse Keys'), A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED);
         this.menu.addMenuItem(mouseKeys);
 
         this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
index d570cb47180b8242fedd5f4893daccb70516698e..499c89b89f66f0d5e33740dd83d240bdea267b1c 100644 (file)
@@ -413,7 +413,7 @@ var InputSourceManager = class extends Signals.EventEmitter {
         // effect without considerable work to consolidate the usage
         // of pushModal/popModal and grabHelper. See
         // https://bugzilla.gnome.org/show_bug.cgi?id=695143 .
-        if (Main.actionMode == Shell.ActionMode.POPUP) {
+        if (Main.actionMode === Shell.ActionMode.POPUP) {
             this._modifiersSwitcher();
             return;
         }
index a25fdc51ac1a4c7c2d9ea56569d2ac8ea0409f5e..21c73a1f1ef832d430c4574de751c869d81051a8 100644 (file)
@@ -329,7 +329,7 @@ var WorkspaceTracker = class {
     _windowEnteredMonitor(metaDisplay, monitorIndex, _metaWin) {
         // If the window entered the primary monitor, that
         // might make that workspace non-empty
-        if (monitorIndex == Main.layoutManager.primaryIndex)
+        if (monitorIndex === Main.layoutManager.primaryIndex)
             this._queueCheckWorkspaces();
     }
 
index a58ee79498bc1cb1cc0ea787653e8981cff7694c..72a65df5395c3ca75de1aee30d49a4c43a8b7e9b 100644 (file)
@@ -58,7 +58,7 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
         if (!window.can_maximize())
             item.setSensitive(false);
 
-        item = this.addAction(_("Move"), event => {
+        item = this.addAction(_('Move'), event => {
             const device = event.get_device();
             const seat = device.get_seat();
             const deviceType = device.get_device_type();
@@ -77,7 +77,7 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
         if (!window.allows_move())
             item.setSensitive(false);
 
-        item = this.addAction(_("Resize"), event => {
+        item = this.addAction(_('Resize'), event => {
             const device = event.get_device();
             const seat = device.get_seat();
             const deviceType = device.get_device_type();